<?php
/* @var $this CustomerBusinessController */
/* @var $model CustomerBusiness */

$this->breadcrumbs=array(
	'Customer Corporate'=>array('index'),
	'Manage',
);

if ((Yii::app()->user->type==="Personnel")) {

$this->menu=array(
	array('label'=>'List', 'url'=>array('index')),
);
}else {
$this->menu=array(
	array('label'=>'List', 'url'=>array('index')),
	array('label'=>'Create', 'url'=>array('create')),
	);
	}
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#customer-business-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>


<h1>Manage Customer Corporate</h1>


<?php echo CHtml::link('Advanced Search','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'customer-business-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'cust_industry',
		'cust_name',
		'cust_head',
	//	'cust_addnum',
	//	'cust_city',
	//	'cust_country',
		//'cust_faxnum',
		'contact_lname',
		'contact_fname',
		//'contact_telnum',
	//	'contact_email',
	//	'cust_contact',
		//'cust_telnum',
		
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
